﻿@model Consulta.Controllers.ReigstroFormData
@{
    ViewBag.Title = "Add User";
}

<fieldset class="form-horizontal container-fluid">
    <legend>Formulario de Registro</legend>

    <form method="post" class="form-inline">
        <div class="container-fluid">

            <div class="row">
                <div class="form-group col-md-6 @(Html.ViewData.ModelState.IsValidField("UserName") ? null : "has-error")">
                    @Html.LabelFor(x => x.UserName, new { @class = "col-md-3 control-label" })
                    <div class="col-md-9">
                        @Html.TextBoxFor(x => x.UserName, new { @class = "form-control"})
                        @Html.ValidationMessageFor(x => x.UserName, null, new { @class = "help-block" })
                    </div>
                </div>

                <div class="form-group col-md-6 @(Html.ViewData.ModelState.IsValidField("RealName") ? null : "has-error")">
                    @Html.LabelFor(x => x.RealName, new { @class = "col-md-3 control-label" })
                    <div class="col-md-9">
                        @Html.TextBoxFor(x => x.RealName, new { @class = "form-control"})
                        @Html.ValidationMessageFor(x => x.RealName, null, new { @class = "help-block" })
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="form-group col-md-6 @(Html.ViewData.ModelState.IsValidField("Mail") ? null : "has-error")">
                    @Html.LabelFor(x => x.Mail, new { @class = "col-md-3 control-label" })
                    <div class="col-md-9">
                        @Html.TextBoxFor(x => x.Mail, new { @class = "form-control"})
                        @Html.ValidationMessageFor(x => x.Mail, null, new { @class = "help-block" })
                    </div>
                </div>

                <div class="form-group col-md-6">
                    @Html.LabelFor(x => x.IdEmpresa, new { @class= "col-md-3 control-label" })
                <div class="col-md-9">
                    @Html.DropDownListFor(x => x.IdEmpresa, new SelectList(ViewBag.ListaEmpresas, "Codigo", "Nombre"), new { @class = "form-control" })
                    @Html.ValidationMessageFor(x => x.IdEmpresa, null, new { @class = "help-block" })
                </div>
                </div>
            </div>


            <div class="row">
                <div class="form-group col-md-6 @(Html.ViewData.ModelState.IsValidField("password") ? null : "has-error")">
                    @Html.LabelFor(x => x.Password, new { @class = "col-md-3 control-label" })
                    <div class="col-md-9">
                        @Html.PasswordFor(x => x.Password, new { @class = "form-control", placeholder = "Ingrese Contraseña" })
                        @Html.ValidationMessageFor(x => x.Password, null, new { @class = "help-block" })
                    </div>

                <div class="form-group col-md-6 @(Html.ViewData.ModelState.IsValidField("CheckPassword") ? null : "has-error")">
                    <div class="col-md-9">
                        @Html.PasswordFor(x => x.CheckPassword, new { @class = "form-control", placeholder = "Confirmar Contraseña" })
                        @Html.ValidationMessageFor(x => x.CheckPassword, null, new { @class = "help-block" })
                    </div>
            </div>
         </div>
                </div>

        <button type="submit" class="btn btn-success btn-xs">Confirmar</button>
    </form>

    

</fieldset>
